package team1.project2.vmlogs;

import java.util.Date;

public class SysMessage {
	private Date	dateTime;
	private String	event;
	
	public Date getDateTime() {
		return this.dateTime;
	}
	
	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}
	
	public String getEvent() {
		return this.event;
	}
	
	public void setEvent(String event) {
		this.event = event;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
		        + ((this.dateTime == null) ? 0 : this.dateTime.hashCode());
		result = prime * result
		        + ((this.event == null) ? 0 : this.event.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SysMessage other = (SysMessage) obj;
		if (this.dateTime == null) {
			if (other.dateTime != null)
				return false;
		} else if (!this.dateTime.equals(other.dateTime))
			return false;
		if (this.event == null) {
			if (other.event != null)
				return false;
		} else if (!this.event.equals(other.event))
			return false;
		return true;
	}
	
}
